package main

import (
	"fmt"
	"os"
	"os/signal"
	"syscall"
	"time"
)

func main() {
	sigChan := make(chan os.Signal, 1)
	signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		for i := 0; i != 3; i++ {
			<-sigChan
			fmt.Println("recv some signal good", i)
		}
		os.Exit(0)
	}()
	time.Sleep(time.Second * 88888)
}
